package com.roc.steelend.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.roc.steelend.pojo.BuyOrder;
import com.roc.steelend.pojo.SaleOrder;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigInteger;
import java.sql.Date;
import java.util.HashMap;
import java.util.List;

@Repository
public interface SaleOrderMapper extends BaseMapper<SaleOrder> {

    List<SaleOrder> findALlMsg(
            @Param("bigTypeId")Integer bigTypeId, @Param("smallTypeId")Integer smallTypeId,
           @Param("specification")String specification,
            @Param("clientName")String clientName, @Param("showAllPayInvoice")Boolean showAllPayInvoice,
            @Param("showPay")Boolean showPay, @Param("showInvoice")Boolean showInvoice,
            @Param("startDate") Date startDate, @Param("endDate")Date endDate);

    Integer saleFindRecodingCount(
            @Param("bigTypeId")Integer bigTypeId, @Param("smallTypeId")Integer smallTypeId,
            @Param("specification")String specification,
            @Param("clientName")String clientName, @Param("showAllPayInvoice")Boolean showAllPayInvoice,
            @Param("showPay")Boolean showPay, @Param("showInvoice")Boolean showInvoice,
            @Param("startDate")Date startDate,@Param("endDate")Date endDate);

    Integer updateReconciliationByClient(@Param("client")Integer clientId,
                                            @Param("reconciliationSaleId") BigInteger reconciliationSaleId);

    Integer updateTiaoPiaoByClient(@Param("client")Integer clientId,
                                         @Param("tiaoPiaoSaleId") BigInteger tiaoPiaoSaleId);


    Integer selectEchartsByPay();

    Integer selectByEchartsByInvoice();


    List<HashMap<String,Object>> selectAllBuClientId(@Param("clientId")Integer clientId);
    List<HashMap<String,Object>> selectAllBuClientIdInvoice(@Param("clientId")Integer clientId);


}
